# 定义元组
t1 = (1, "Hello", True)
t2 = ("hello",)
t3 = tuple()
t4 = ("hello")
print(f"t1的类型是：{type(t1)},内容是：{t1}")
print(f"t2的类型是：{type(t2)},内容是：{t2}")
print(f"t3的类型是：{type(t3)},内容是：{t3}")
print(f"t4的类型是：{type(t4)},内容是：{t4}")
# 元组嵌套
t5 = ((1, 2, 3), (4, 5, 6))
print(f"t5的类型是：{type(t5)},内容是：{t5}")


print(t5[1][2])

t6 = ("11", "22", "33", "11")
index = t6.index("11")
print(f"t6中的11下标为：{index}")

count = t6.count("11")
print(f"t6中的11个数为：{count}")

print(f"t6的元素个数为：{len(t6)}")

index = 0
while index < len(t6):
    print(t6[index], end=" ")
    index += 1

print()
for i in t6:
    print(i, end=' ')
